<?php
class registry
{
	private $vars = array();
	private static $instance ;
	
	public function set( $index, $value )
	{
		$this->vars[$index] = $value ;
	}
	
	public function get( $index )
	{
		return $this->vars[$index] ;
	}
	
	 public static function singleton() 
    {
        if (!isset(self::$instance)) {
            $c = __CLASS__ ;
            self::$instance = new $c ;
        }

        return self::$instance ;
    }
}